#!/bin/bash

# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#  http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Set Ranger KMS specific environment variables here.

export JAVA_HOME={{java_home}}
export RANGER_KMS_LOG_DIR={{kms_log_dir}}
export RANGER_KMS_PID_DIR_PATH={{ranger_kms_pid_dir}}
export KMS_USER={{kms_user}}
ranger_kms_max_heap_size={{ranger_kms_max_heap_size}}
{% if security_enabled %}
export JAVA_OPTS=" ${JAVA_OPTS} -Dzookeeper.sasl.client.username={{zookeeper_principal_primary}} "
{% endif %}
